﻿using Inovout.Cloud.Applications.Security.Models;
using Inovout.Services;
using NHibernate.Criterion;
using System;

namespace Inovout.Cloud.Applications.Security.Services
{
    public class NonceService : RepositoryService<Nonce>
    {
        public bool Exists(string context, string code, DateTime timestamp)
        {
            return Repository.Exists(Restrictions.Eq("Context", context),
                Restrictions.Eq("Code", code), Restrictions.Eq("Timestamp", timestamp));
        }
    }
}
